package com.tarena.lbs.coupon.controller;

import com.tarena.lbs.coupon.dao.mapper.UserCouponsMapper;
import com.tarena.lbs.coupon.dao.repository.UserCouponsRepository;
import com.tarena.lbs.coupon.pojo.po.UserCouponsPO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public class UserCouponsRepositoryImpl implements UserCouponsRepository {
    
    @Autowired
    private UserCouponsMapper userCouponsMapper;
    
    @Override
    public int insert(UserCouponsPO userCouponsPO) {
        return userCouponsMapper.insert(userCouponsPO);
    }
    
    @Override
    public int countByUserIdAndCouponId(Integer userId, Integer couponId) {
        return userCouponsMapper.countByUserIdAndCouponId(userId, couponId);
    }
}